package com.usefullc.english.enums;


import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 内容来源
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ContentSourceEnum {


    INSIDE(0, "本站"),

    NCE(1, "省心英语"),

    KEKE(2, "可可英语"),



    ;


    private int code;
    private String value;

    ContentSourceEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }


    public static ContentSourceEnum getByCode(int code) {

        for (ContentSourceEnum s : ContentSourceEnum.values()) {
            if (s.getCode() == code) {
                return s;
            }
        }
        return null;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {


        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

}
